// 导出不能用let关键字！！
export const roleObj = {
  methods: {
    checkPoint (key) {
      let userInfo = this.$store.state.user.userInfo
      // 判断是否有roles，且有roles里面的points
      if (userInfo.roles && userInfo.roles.points) {
        return userInfo.roles.points.includes(key)
      }
      return false
    }
  }
}
